package main

import (
	"Infinichat_mixed/client/c_processPkg"
	"fmt"
)

var account string
var userPwd string

func main() {
	var key int
	var loop = true
	up := &c_processPkg.UserProcess{}
	for loop {
		fmt.Println("---------------------------- Infinichat ----------------------------")
		fmt.Println("\t\t\t 1 login")
		fmt.Println("\t\t\t 2 exit")
		fmt.Print("Please input:")
		fmt.Scanf("%d\n", &key)
		switch key {
		case 1:
			fmt.Println("Welcome char room!")
			fmt.Println("please input account:")
			fmt.Scanf("%s\n", &account)
			fmt.Println("please input pwd:")
			fmt.Scanf("%s\n", &userPwd)
			up.Login(account, userPwd)
		case 2:
			fmt.Println("exit")
			loop = false
		default:
			fmt.Println("error, input again")
		}
	}

}
